3.102 \(\int \frac {(g+h x)^2 (d+e x+f x^2)}{\sqrt {a+c x^2}} \, dx\)

Optimal. Leaf size=223 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) \left (3 a^2 f h^2-4 a c \left (h (d h+2 e g)+f g^2\right )+8 c^2 d g^2\right )}{8 c^{5/2}}-\frac {\sqrt {a+c x^2} \left (4 \left (4 a h^2 (e h+2 f g)+c g \left (f g^2-4 h (3 d h+e g)\right )\right )-h x \left (3 h^2 (4 c d-3 a f)-2 c g (f g-4 e h)\right )\right )}{24 c^2 h}-\frac {\sqrt {a+c x^2} (g+h x)^2 (f g-4 e h)}{12 c h}+\frac {f \sqrt {a+c x^2} (g+h x)^3}{4 c h} \]

[Out]

1/8*(8*c^2*d*g^2+3*a^2*f*h^2-4*a*c*(f*g^2+h*(d*h+2*e*g)))*arctanh(x*c^(1/2)/(c*x^2+a)^(1/2))/c^(5/2)-1/12*(-4*
e*h+f*g)*(h*x+g)^2*(c*x^2+a)^(1/2)/c/h+1/4*f*(h*x+g)^3*(c*x^2+a)^(1/2)/c/h-1/24*(16*a*h^2*(e*h+2*f*g)+4*c*g*(f
*g^2-4*h*(3*d*h+e*g))-h*(3*(-3*a*f+4*c*d)*h^2-2*c*g*(-4*e*h+f*g))*x)*(c*x^2+a)^(1/2)/c^2/h

________________________________________________________________________________________

Rubi [A]  time = 0.37, antiderivative size = 222, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {1654, 833, 780, 217, 206} \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) \left (3 a^2 f h^2-4 a c \left (h (d h+2 e g)+f g^2\right )+8 c^2 d g^2\right )}{8 c^{5/2}}-\frac {\sqrt {a+c x^2} \left (4 \left (4 a h^2 (e h+2 f g)-4 c g h (3 d h+e g)+c f g^3\right )-h x \left (3 h^2 (4 c d-3 a f)-2 c g (f g-4 e h)\right )\right )}{24 c^2 h}-\frac {\sqrt {a+c x^2} (g+h x)^2 (f g-4 e h)}{12 c h}+\frac {f \sqrt {a+c x^2} (g+h x)^3}{4 c h} \]

Antiderivative was successfully verified.

[In]

Int[((g + h*x)^2*(d + e*x + f*x^2))/Sqrt[a + c*x^2],x]

[Out]

-((f*g - 4*e*h)*(g + h*x)^2*Sqrt[a + c*x^2])/(12*c*h) + (f*(g + h*x)^3*Sqrt[a + c*x^2])/(4*c*h) - ((4*(c*f*g^3
 - 4*c*g*h*(e*g + 3*d*h) + 4*a*h^2*(2*f*g + e*h)) - h*(3*(4*c*d - 3*a*f)*h^2 - 2*c*g*(f*g - 4*e*h))*x)*Sqrt[a
+ c*x^2])/(24*c^2*h) + ((8*c^2*d*g^2 + 3*a^2*f*h^2 - 4*a*c*(f*g^2 + h*(2*e*g + d*h)))*ArcTanh[(Sqrt[c]*x)/Sqrt
[a + c*x^2]])/(8*c^(5/2))

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 780

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(((e*f + d*g)*(2*p
 + 3) + 2*e*g*(p + 1)*x)*(a + c*x^2)^(p + 1))/(2*c*(p + 1)*(2*p + 3)), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(c*
(2*p + 3)), Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, p}, x] &&  !LeQ[p, -1]

Rule 833

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(g*(d + e*x)
^m*(a + c*x^2)^(p + 1))/(c*(m + 2*p + 2)), x] + Dist[1/(c*(m + 2*p + 2)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^p*
Simp[c*d*f*(m + 2*p + 2) - a*e*g*m + c*(e*f*(m + 2*p + 2) + d*g*m)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g, p
}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ
[2*m, 2*p]) &&  !(IGtQ[m, 0] && EqQ[f, 0])

Rule 1654

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], f = Coeff
[Pq, x, Expon[Pq, x]]}, Simp[(f*(d + e*x)^(m + q - 1)*(a + c*x^2)^(p + 1))/(c*e^(q - 1)*(m + q + 2*p + 1)), x]
 + Dist[1/(c*e^q*(m + q + 2*p + 1)), Int[(d + e*x)^m*(a + c*x^2)^p*ExpandToSum[c*e^q*(m + q + 2*p + 1)*Pq - c*
f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x)^(q - 2)*(a*e^2*(m + q - 1) - c*d^2*(m + q + 2*p + 1) - 2*c*d*e*(
m + q + p)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, c, d, e, m, p}, x] && PolyQ[Pq
, x] && NeQ[c*d^2 + a*e^2, 0] &&  !(EqQ[d, 0] && True) &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[
p] || ILtQ[p + 1/2, 0]))

Rubi steps

\begin {align*} \int \frac {(g+h x)^2 \left (d+e x+f x^2\right )}{\sqrt {a+c x^2}} \, dx &=\frac {f (g+h x)^3 \sqrt {a+c x^2}}{4 c h}+\frac {\int \frac {(g+h x)^2 \left ((4 c d-3 a f) h^2-c h (f g-4 e h) x\right )}{\sqrt {a+c x^2}} \, dx}{4 c h^2}\\ &=-\frac {(f g-4 e h) (g+h x)^2 \sqrt {a+c x^2}}{12 c h}+\frac {f (g+h x)^3 \sqrt {a+c x^2}}{4 c h}+\frac {\int \frac {(g+h x) \left (c h^2 (12 c d g-7 a f g-8 a e h)+c h \left (3 (4 c d-3 a f) h^2-2 c g (f g-4 e h)\right ) x\right )}{\sqrt {a+c x^2}} \, dx}{12 c^2 h^2}\\ &=-\frac {(f g-4 e h) (g+h x)^2 \sqrt {a+c x^2}}{12 c h}+\frac {f (g+h x)^3 \sqrt {a+c x^2}}{4 c h}-\frac {\left (4 \left (c f g^3-4 c g h (e g+3 d h)+4 a h^2 (2 f g+e h)\right )-h \left (3 (4 c d-3 a f) h^2-2 c g (f g-4 e h)\right ) x\right ) \sqrt {a+c x^2}}{24 c^2 h}+\frac {\left (8 c^2 d g^2+3 a^2 f h^2-4 a c \left (f g^2+h (2 e g+d h)\right )\right ) \int \frac {1}{\sqrt {a+c x^2}} \, dx}{8 c^2}\\ &=-\frac {(f g-4 e h) (g+h x)^2 \sqrt {a+c x^2}}{12 c h}+\frac {f (g+h x)^3 \sqrt {a+c x^2}}{4 c h}-\frac {\left (4 \left (c f g^3-4 c g h (e g+3 d h)+4 a h^2 (2 f g+e h)\right )-h \left (3 (4 c d-3 a f) h^2-2 c g (f g-4 e h)\right ) x\right ) \sqrt {a+c x^2}}{24 c^2 h}+\frac {\left (8 c^2 d g^2+3 a^2 f h^2-4 a c \left (f g^2+h (2 e g+d h)\right )\right ) \operatorname {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{8 c^2}\\ &=-\frac {(f g-4 e h) (g+h x)^2 \sqrt {a+c x^2}}{12 c h}+\frac {f (g+h x)^3 \sqrt {a+c x^2}}{4 c h}-\frac {\left (4 \left (c f g^3-4 c g h (e g+3 d h)+4 a h^2 (2 f g+e h)\right )-h \left (3 (4 c d-3 a f) h^2-2 c g (f g-4 e h)\right ) x\right ) \sqrt {a+c x^2}}{24 c^2 h}+\frac {\left (8 c^2 d g^2+3 a^2 f h^2-4 a c \left (f g^2+h (2 e g+d h)\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{8 c^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.23, size = 164, normalized size = 0.74 \[ \frac {3 \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) \left (3 a^2 f h^2-4 a c \left (h (d h+2 e g)+f g^2\right )+8 c^2 d g^2\right )+\sqrt {c} \sqrt {a+c x^2} \left (2 c \left (6 d h (4 g+h x)+4 e \left (3 g^2+3 g h x+h^2 x^2\right )+f x \left (6 g^2+8 g h x+3 h^2 x^2\right )\right )-a h (16 e h+32 f g+9 f h x)\right )}{24 c^{5/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[((g + h*x)^2*(d + e*x + f*x^2))/Sqrt[a + c*x^2],x]

[Out]

(Sqrt[c]*Sqrt[a + c*x^2]*(-(a*h*(32*f*g + 16*e*h + 9*f*h*x)) + 2*c*(6*d*h*(4*g + h*x) + 4*e*(3*g^2 + 3*g*h*x +
 h^2*x^2) + f*x*(6*g^2 + 8*g*h*x + 3*h^2*x^2))) + 3*(8*c^2*d*g^2 + 3*a^2*f*h^2 - 4*a*c*(f*g^2 + h*(2*e*g + d*h
)))*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(24*c^(5/2))

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 381, normalized size = 1.71 \[ \left [-\frac {3 \, {\left (8 \, a c e g h - 4 \, {\left (2 \, c^{2} d - a c f\right )} g^{2} + {\left (4 \, a c d - 3 \, a^{2} f\right )} h^{2}\right )} \sqrt {c} \log \left (-2 \, c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) - 2 \, {\left (6 \, c^{2} f h^{2} x^{3} + 24 \, c^{2} e g^{2} - 16 \, a c e h^{2} + 16 \, {\left (3 \, c^{2} d - 2 \, a c f\right )} g h + 8 \, {\left (2 \, c^{2} f g h + c^{2} e h^{2}\right )} x^{2} + 3 \, {\left (4 \, c^{2} f g^{2} + 8 \, c^{2} e g h + {\left (4 \, c^{2} d - 3 \, a c f\right )} h^{2}\right )} x\right )} \sqrt {c x^{2} + a}}{48 \, c^{3}}, \frac {3 \, {\left (8 \, a c e g h - 4 \, {\left (2 \, c^{2} d - a c f\right )} g^{2} + {\left (4 \, a c d - 3 \, a^{2} f\right )} h^{2}\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) + {\left (6 \, c^{2} f h^{2} x^{3} + 24 \, c^{2} e g^{2} - 16 \, a c e h^{2} + 16 \, {\left (3 \, c^{2} d - 2 \, a c f\right )} g h + 8 \, {\left (2 \, c^{2} f g h + c^{2} e h^{2}\right )} x^{2} + 3 \, {\left (4 \, c^{2} f g^{2} + 8 \, c^{2} e g h + {\left (4 \, c^{2} d - 3 \, a c f\right )} h^{2}\right )} x\right )} \sqrt {c x^{2} + a}}{24 \, c^{3}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/48*(3*(8*a*c*e*g*h - 4*(2*c^2*d - a*c*f)*g^2 + (4*a*c*d - 3*a^2*f)*h^2)*sqrt(c)*log(-2*c*x^2 - 2*sqrt(c*x^
2 + a)*sqrt(c)*x - a) - 2*(6*c^2*f*h^2*x^3 + 24*c^2*e*g^2 - 16*a*c*e*h^2 + 16*(3*c^2*d - 2*a*c*f)*g*h + 8*(2*c
^2*f*g*h + c^2*e*h^2)*x^2 + 3*(4*c^2*f*g^2 + 8*c^2*e*g*h + (4*c^2*d - 3*a*c*f)*h^2)*x)*sqrt(c*x^2 + a))/c^3, 1
/24*(3*(8*a*c*e*g*h - 4*(2*c^2*d - a*c*f)*g^2 + (4*a*c*d - 3*a^2*f)*h^2)*sqrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2
 + a)) + (6*c^2*f*h^2*x^3 + 24*c^2*e*g^2 - 16*a*c*e*h^2 + 16*(3*c^2*d - 2*a*c*f)*g*h + 8*(2*c^2*f*g*h + c^2*e*
h^2)*x^2 + 3*(4*c^2*f*g^2 + 8*c^2*e*g*h + (4*c^2*d - 3*a*c*f)*h^2)*x)*sqrt(c*x^2 + a))/c^3]

________________________________________________________________________________________

giac [A]  time = 0.23, size = 206, normalized size = 0.92 \[ \frac {1}{24} \, \sqrt {c x^{2} + a} {\left ({\left (2 \, {\left (\frac {3 \, f h^{2} x}{c} + \frac {4 \, {\left (2 \, c^{3} f g h + c^{3} h^{2} e\right )}}{c^{4}}\right )} x + \frac {3 \, {\left (4 \, c^{3} f g^{2} + 4 \, c^{3} d h^{2} - 3 \, a c^{2} f h^{2} + 8 \, c^{3} g h e\right )}}{c^{4}}\right )} x + \frac {8 \, {\left (6 \, c^{3} d g h - 4 \, a c^{2} f g h + 3 \, c^{3} g^{2} e - 2 \, a c^{2} h^{2} e\right )}}{c^{4}}\right )} - \frac {{\left (8 \, c^{2} d g^{2} - 4 \, a c f g^{2} - 4 \, a c d h^{2} + 3 \, a^{2} f h^{2} - 8 \, a c g h e\right )} \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + a} \right |}\right )}{8 \, c^{\frac {5}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/24*sqrt(c*x^2 + a)*((2*(3*f*h^2*x/c + 4*(2*c^3*f*g*h + c^3*h^2*e)/c^4)*x + 3*(4*c^3*f*g^2 + 4*c^3*d*h^2 - 3*
a*c^2*f*h^2 + 8*c^3*g*h*e)/c^4)*x + 8*(6*c^3*d*g*h - 4*a*c^2*f*g*h + 3*c^3*g^2*e - 2*a*c^2*h^2*e)/c^4) - 1/8*(
8*c^2*d*g^2 - 4*a*c*f*g^2 - 4*a*c*d*h^2 + 3*a^2*f*h^2 - 8*a*c*g*h*e)*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^
(5/2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 339, normalized size = 1.52 \[ \frac {\sqrt {c \,x^{2}+a}\, f \,h^{2} x^{3}}{4 c}+\frac {\sqrt {c \,x^{2}+a}\, e \,h^{2} x^{2}}{3 c}+\frac {2 \sqrt {c \,x^{2}+a}\, f g h \,x^{2}}{3 c}+\frac {3 a^{2} f \,h^{2} \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{8 c^{\frac {5}{2}}}-\frac {a d \,h^{2} \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{2 c^{\frac {3}{2}}}-\frac {a e g h \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{c^{\frac {3}{2}}}-\frac {a f \,g^{2} \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{2 c^{\frac {3}{2}}}+\frac {d \,g^{2} \ln \left (\sqrt {c}\, x +\sqrt {c \,x^{2}+a}\right )}{\sqrt {c}}-\frac {3 \sqrt {c \,x^{2}+a}\, a f \,h^{2} x}{8 c^{2}}+\frac {\sqrt {c \,x^{2}+a}\, d \,h^{2} x}{2 c}+\frac {\sqrt {c \,x^{2}+a}\, e g h x}{c}+\frac {\sqrt {c \,x^{2}+a}\, f \,g^{2} x}{2 c}-\frac {2 \sqrt {c \,x^{2}+a}\, a e \,h^{2}}{3 c^{2}}-\frac {4 \sqrt {c \,x^{2}+a}\, a f g h}{3 c^{2}}+\frac {2 \sqrt {c \,x^{2}+a}\, d g h}{c}+\frac {\sqrt {c \,x^{2}+a}\, e \,g^{2}}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^2*(f*x^2+e*x+d)/(c*x^2+a)^(1/2),x)

[Out]

1/4*h^2*f*x^3/c*(c*x^2+a)^(1/2)-3/8*h^2*f*a/c^2*x*(c*x^2+a)^(1/2)+3/8*h^2*f*a^2/c^(5/2)*ln(c^(1/2)*x+(c*x^2+a)
^(1/2))+1/3*x^2/c*(c*x^2+a)^(1/2)*h^2*e+2/3*x^2/c*(c*x^2+a)^(1/2)*g*h*f-2/3*a/c^2*(c*x^2+a)^(1/2)*h^2*e-4/3*a/
c^2*(c*x^2+a)^(1/2)*g*h*f+1/2*x/c*(c*x^2+a)^(1/2)*d*h^2+x/c*(c*x^2+a)^(1/2)*e*g*h+1/2*x/c*(c*x^2+a)^(1/2)*f*g^
2-1/2*a/c^(3/2)*ln(c^(1/2)*x+(c*x^2+a)^(1/2))*d*h^2-a/c^(3/2)*ln(c^(1/2)*x+(c*x^2+a)^(1/2))*e*g*h-1/2*a/c^(3/2
)*ln(c^(1/2)*x+(c*x^2+a)^(1/2))*f*g^2+2/c*(c*x^2+a)^(1/2)*g*h*d+1/c*(c*x^2+a)^(1/2)*g^2*e+g^2*d*ln(c^(1/2)*x+(
c*x^2+a)^(1/2))/c^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 230, normalized size = 1.03 \[ \frac {\sqrt {c x^{2} + a} f h^{2} x^{3}}{4 \, c} - \frac {3 \, \sqrt {c x^{2} + a} a f h^{2} x}{8 \, c^{2}} + \frac {d g^{2} \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {c}} + \frac {3 \, a^{2} f h^{2} \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{8 \, c^{\frac {5}{2}}} + \frac {\sqrt {c x^{2} + a} e g^{2}}{c} + \frac {2 \, \sqrt {c x^{2} + a} d g h}{c} + \frac {{\left (2 \, f g h + e h^{2}\right )} \sqrt {c x^{2} + a} x^{2}}{3 \, c} + \frac {{\left (f g^{2} + 2 \, e g h + d h^{2}\right )} \sqrt {c x^{2} + a} x}{2 \, c} - \frac {{\left (f g^{2} + 2 \, e g h + d h^{2}\right )} a \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{2 \, c^{\frac {3}{2}}} - \frac {2 \, {\left (2 \, f g h + e h^{2}\right )} \sqrt {c x^{2} + a} a}{3 \, c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/4*sqrt(c*x^2 + a)*f*h^2*x^3/c - 3/8*sqrt(c*x^2 + a)*a*f*h^2*x/c^2 + d*g^2*arcsinh(c*x/sqrt(a*c))/sqrt(c) + 3
/8*a^2*f*h^2*arcsinh(c*x/sqrt(a*c))/c^(5/2) + sqrt(c*x^2 + a)*e*g^2/c + 2*sqrt(c*x^2 + a)*d*g*h/c + 1/3*(2*f*g
*h + e*h^2)*sqrt(c*x^2 + a)*x^2/c + 1/2*(f*g^2 + 2*e*g*h + d*h^2)*sqrt(c*x^2 + a)*x/c - 1/2*(f*g^2 + 2*e*g*h +
 d*h^2)*a*arcsinh(c*x/sqrt(a*c))/c^(3/2) - 2/3*(2*f*g*h + e*h^2)*sqrt(c*x^2 + a)*a/c^2

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (g+h\,x\right )}^2\,\left (f\,x^2+e\,x+d\right )}{\sqrt {c\,x^2+a}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((g + h*x)^2*(d + e*x + f*x^2))/(a + c*x^2)^(1/2),x)

[Out]

int(((g + h*x)^2*(d + e*x + f*x^2))/(a + c*x^2)^(1/2), x)

________________________________________________________________________________________

sympy [A]  time = 15.78, size = 518, normalized size = 2.32 \[ - \frac {3 a^{\frac {3}{2}} f h^{2} x}{8 c^{2} \sqrt {1 + \frac {c x^{2}}{a}}} + \frac {\sqrt {a} d h^{2} x \sqrt {1 + \frac {c x^{2}}{a}}}{2 c} + \frac {\sqrt {a} e g h x \sqrt {1 + \frac {c x^{2}}{a}}}{c} + \frac {\sqrt {a} f g^{2} x \sqrt {1 + \frac {c x^{2}}{a}}}{2 c} - \frac {\sqrt {a} f h^{2} x^{3}}{8 c \sqrt {1 + \frac {c x^{2}}{a}}} + \frac {3 a^{2} f h^{2} \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{8 c^{\frac {5}{2}}} - \frac {a d h^{2} \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{2 c^{\frac {3}{2}}} - \frac {a e g h \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{c^{\frac {3}{2}}} - \frac {a f g^{2} \operatorname {asinh}{\left (\frac {\sqrt {c} x}{\sqrt {a}} \right )}}{2 c^{\frac {3}{2}}} + d g^{2} \left (\begin {cases} \frac {\sqrt {- \frac {a}{c}} \operatorname {asin}{\left (x \sqrt {- \frac {c}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge c < 0 \\\frac {\sqrt {\frac {a}{c}} \operatorname {asinh}{\left (x \sqrt {\frac {c}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge c > 0 \\\frac {\sqrt {- \frac {a}{c}} \operatorname {acosh}{\left (x \sqrt {- \frac {c}{a}} \right )}}{\sqrt {- a}} & \text {for}\: c > 0 \wedge a < 0 \end {cases}\right ) + 2 d g h \left (\begin {cases} \frac {x^{2}}{2 \sqrt {a}} & \text {for}\: c = 0 \\\frac {\sqrt {a + c x^{2}}}{c} & \text {otherwise} \end {cases}\right ) + e g^{2} \left (\begin {cases} \frac {x^{2}}{2 \sqrt {a}} & \text {for}\: c = 0 \\\frac {\sqrt {a + c x^{2}}}{c} & \text {otherwise} \end {cases}\right ) + e h^{2} \left (\begin {cases} - \frac {2 a \sqrt {a + c x^{2}}}{3 c^{2}} + \frac {x^{2} \sqrt {a + c x^{2}}}{3 c} & \text {for}\: c \neq 0 \\\frac {x^{4}}{4 \sqrt {a}} & \text {otherwise} \end {cases}\right ) + 2 f g h \left (\begin {cases} - \frac {2 a \sqrt {a + c x^{2}}}{3 c^{2}} + \frac {x^{2} \sqrt {a + c x^{2}}}{3 c} & \text {for}\: c \neq 0 \\\frac {x^{4}}{4 \sqrt {a}} & \text {otherwise} \end {cases}\right ) + \frac {f h^{2} x^{5}}{4 \sqrt {a} \sqrt {1 + \frac {c x^{2}}{a}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**2*(f*x**2+e*x+d)/(c*x**2+a)**(1/2),x)

[Out]

-3*a**(3/2)*f*h**2*x/(8*c**2*sqrt(1 + c*x**2/a)) + sqrt(a)*d*h**2*x*sqrt(1 + c*x**2/a)/(2*c) + sqrt(a)*e*g*h*x
*sqrt(1 + c*x**2/a)/c + sqrt(a)*f*g**2*x*sqrt(1 + c*x**2/a)/(2*c) - sqrt(a)*f*h**2*x**3/(8*c*sqrt(1 + c*x**2/a
)) + 3*a**2*f*h**2*asinh(sqrt(c)*x/sqrt(a))/(8*c**(5/2)) - a*d*h**2*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3/2)) - a*
e*g*h*asinh(sqrt(c)*x/sqrt(a))/c**(3/2) - a*f*g**2*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3/2)) + d*g**2*Piecewise((s
qrt(-a/c)*asin(x*sqrt(-c/a))/sqrt(a), (a > 0) & (c < 0)), (sqrt(a/c)*asinh(x*sqrt(c/a))/sqrt(a), (a > 0) & (c
> 0)), (sqrt(-a/c)*acosh(x*sqrt(-c/a))/sqrt(-a), (c > 0) & (a < 0))) + 2*d*g*h*Piecewise((x**2/(2*sqrt(a)), Eq
(c, 0)), (sqrt(a + c*x**2)/c, True)) + e*g**2*Piecewise((x**2/(2*sqrt(a)), Eq(c, 0)), (sqrt(a + c*x**2)/c, Tru
e)) + e*h**2*Piecewise((-2*a*sqrt(a + c*x**2)/(3*c**2) + x**2*sqrt(a + c*x**2)/(3*c), Ne(c, 0)), (x**4/(4*sqrt
(a)), True)) + 2*f*g*h*Piecewise((-2*a*sqrt(a + c*x**2)/(3*c**2) + x**2*sqrt(a + c*x**2)/(3*c), Ne(c, 0)), (x*
*4/(4*sqrt(a)), True)) + f*h**2*x**5/(4*sqrt(a)*sqrt(1 + c*x**2/a))

________________________________________________________________________________________